package com.pentakill.mo.auth.res.web;

import java.util.List;

import com.pentakill.mo.auth.res.business.ebi.ResEbi;
import com.pentakill.mo.auth.res.vo.ResModel;
import com.pentakill.mo.auth.res.vo.ResQueryModel;
import com.pentakill.mo.util.base.BaseAction;


public class ResAction extends BaseAction{
	public ResModel rm = new ResModel();
	public ResQueryModel rqm = new ResQueryModel();
	private ResEbi resEbi;
	public void setResEbi(ResEbi resEbi) {
		this.resEbi = resEbi;
	}
	
	public String list(){
		setDataTotal(resEbi.getCount(rqm));
		List<ResModel> resList = resEbi.getAll(rqm,pageNum,pageCount);
		put("resList",resList);
		return LIST;
	}
	
	
	public String input(){
		return INPUT;
	}
	
	public String seve(){
		
		if (rm.getUuid()!= null) {
			resEbi.update(rm);
		}else {
			resEbi.save(rm);
		}
		return TO_LIST;
	}
	
	
	
	
	
	
	
	
	
}
